﻿namespace 贪吃蛇
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Game game = new Game();
            while (true)
            {
                switch (Game.scene)
                {
                    case E_Scene.Start:
                        new Start().start();
                        break;
                    case E_Scene.Play:
                        new Play().play();
                        break;
                    case E_Scene.Diffuculty:
                        new Diffuculty().diffuculty(); //排行榜需要数据库支持 //写入硬盘
                        break;
                    case E_Scene.Over:
                        new Over().over();
                        break;
                    default:
                        break;
                }
            }
        }
    }
    class Game
    {
        public static E_Scene scene = E_Scene.Start; //测试用, 记得
        public static int winWidth = 50, winHeight = 30;
        public static int bufWidth = 50, bufHeight = 30;
        //int playerX = bufWidth * 3 / 4, playerY = bufHeight * 3 / 4;
        //int bossX = bufWidth / 2, bossY = bufHeight / 2;
        public Game()
        {
            Console.SetWindowSize(winWidth, winHeight);
            Console.SetBufferSize(bufWidth, bufHeight);
            Console.CursorVisible = false;
        }
        public virtual void start()
        {
        }

        public virtual void play()
        {
        }


        public virtual void over()
        {
        }
        public virtual void diffuculty()
        {
        }

    } //可创建多个游戏实例, 支持联机功能实现


    enum E_Scene
    {
        Start, Play, Over, Diffuculty
    }
}
